<template>
  <n-card title="数据库管理">
    <n-space vertical>
      <n-alert type="warning">
        数据库管理功能，请谨慎操作
      </n-alert>
      <n-data-table
        :columns="columns"
        :data="data"
        :pagination="pagination"
      />
    </n-space>
  </n-card>
</template>

<script setup>
import { ref } from 'vue'
import { NCard, NSpace, NAlert, NDataTable } from 'naive-ui'

const columns = [
  { title: '表名', key: 'name' },
  { title: '记录数', key: 'count' },
  { title: '大小', key: 'size' },
  { title: '更新时间', key: 'updateTime' }
]

const data = ref([
  { name: '用户表', count: 1542, size: '2.3 MB', updateTime: '2025-10-15' },
  { name: '产品表', count: 876, size: '1.1 MB', updateTime: '2025-10-14' },
  { name: '订单表', count: 3245, size: '4.5 MB', updateTime: '2025-10-15' }
])

const pagination = { pageSize: 10 }
</script>